package com.example.androidlearning2200;

import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class Wdg1Activity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_wdg1);
        /**
         * TextView文本控件的使用说明：
         * text属性设置文本
         * textSize设置文字大小
         * textColor设置文字颜色
         * letterSpacing设置字间距
         * lineSpacingExtra设置行间距
         * singleLine设置单行显示
         * maxLines设置显示的行数
         * ellipsize设置文本显示不下时的显示效果
         */
        TextView textView = findViewById(R.id.textView);
        Button button = findViewById(R.id.button);
        EditText etPhone = findViewById(R.id.etPhone);
        textView.setSelected(true);
        button.setOnClickListener(view -> {
            /*String phone = etPhone.getText().toString();
            if (phone.length() == 0) {
                Log.d("ZWF", "还没有输入，请输入手机号");
            } else {
                Log.d("ZWF", "输入的手机号为：" + phone);
            }*/
            Intent intent = new Intent(this, SplashActivity.class);
            startActivity(intent);
        });
    }

}